﻿using dis.sys.hw1.Contract;
using dis.sys.hw1.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel;
using System.ServiceModel.Description;
using System.Text;

namespace dis.sys.hw1.ClientProxy
{
    public class DelegateHotelServiceProxy : ClientBase<IDelegateHotelService>, IDelegateHotelService
    {
        public DelegateHotelServiceProxy(ServiceEndpoint endpoint)
            : base(endpoint)
        {
            InnerChannel.OperationTimeout = new TimeSpan(0,2,0,0);
        }

        public IList<Hotel> GetAvailableRooms(DateTime fromDate, DateTime toDate, double minStars, double minRating)
        {
            return Channel.GetAvailableRooms(fromDate, toDate, minStars, minRating);
        }

        //public bool HasHotelsInQueryRange(double minStars, double minRating)
        //{
        //    return Channel.HasHotelsInQueryRange(minStars, minRating);
        //}
    }
}
